packaging: build and bundle UI using npm in deb and rpm packages#4605
packaging: build and bundle UI using npm in deb and rpm packages#4605yadvr merged 11 commits intoapache:4.15from
Conversation
This changes deb and rpm packaging to build the UI using npm and bundle it in the `cloudstack-management` package and a new `cloudstack-ui` package. The `cloudstack-ui` package will install the UI under `/usr/share/cloudstack-ui/`. For both packages the config.json will not be overridden on upgrade. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2558 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
|
||
| # cloudstack-ui | ||
| mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-ui | ||
| cd ui && npm install && npm run build && cd .. |
There was a problem hiding this comment.
This assumes that npn is available on the system. However, that's not a guarantee.
The .deb (and .rpm) should have a build depends on 'npm'
There was a problem hiding this comment.
Yes that adds a dependency much like jdk or mvn. I've added nodejs-12 (lts) in the container images that are used to build packages by blueorangutan. https://hub.docker.com/u/bhaisaab
There was a problem hiding this comment.
The problem is that nodejs may not be available in default/main repo of the distros. Should we document it on docs and install.md?
There was a problem hiding this comment.
@rhtyd this looks like a good point to be documented indeed
There was a problem hiding this comment.
The problem is that nodejs may not be available in default/main repo of the distros. Should we document it on docs and install.md?
No, we should require it in the .spec and control file as a hard requirement. The build will fail without those, so it shouldn't even start to build.
The control and .spec file should exactly specify what is needed to build the packages. Without those dependencies the build should not initiate
There was a problem hiding this comment.
Added, but that won't be satisfied automatically chances are somebody will install older version of nodejs.
|
Trillian test result (tid-3403)
|
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@wido @GabrielBrascher doc PR raised here: apache/cloudstack-documentation#182 and I've updated INSTALL.md in this PR |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✖debian. JID-2567 |
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@blueorangutan package |
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@blueorangutan package |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✖debian. JID-2575 |
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2589 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
@weizhouapache I've build/scp-ed the packages here if you want to review/test http://download.cloudstack.org/testing/pr-4605/ |
@rhtyd thanks, I will test it. |
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@blueorangutan package |
|
@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
Aborted previous build job, kicking new one |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
@rhtyd |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2602 |
|
@weizhouapache yes the pkgs just got rebuilt, I'll sync in next 15mins and ping you. |
|
@weizhouapache we've two LGTMs, are you testing this? Thanks. |
@rhtyd yes, tested ok. reviewing code. I will get back to you in 30 min. |
There was a problem hiding this comment.
lgtm
tested ok on ubuntu.
the only concern is, primate ui is shipped with cloudstack-management as well. if cloudstack-management and cloudstack-ui are both installed, the following two folder have same code.
/usr/share/cloudstack-management/webapp
/usr/share/cloudstack-ui
They use same config /etc/cloudstack/ui/config.json, I think it is not a major issue.


This changes deb and rpm packaging to build the UI using npm and bundle
it in the
cloudstack-managementpackage and a newcloudstack-uipackage. The
cloudstack-uipackage will install the UI under/usr/share/cloudstack-ui/. For both packages the config.json will notbe overridden on upgrade.